package com.usdt.web.controller.cp.activity;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.usdt.common.core.domain.R;
import com.usdt.system.domain.req.ActivityAddressTempReqVO;
import com.usdt.system.domain.resp.ActivityAddressTempRespVO;
import com.usdt.system.domain.resp.ActivityRespVO;
import com.usdt.system.service.cp.ActivityAddressTempService;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;

@RestController
@Slf4j
@RequestMapping("/activityAddressTemp")
@Tag(name = "活动地点库")
public class ActivityAddressTempController{
	
	@Autowired
	private ActivityAddressTempService activityAddressTempService;

	/*    @PostMapping("/insert")
	@Operation(summary ="新增")
	public R<Integer> insert(@RequestBody ActivityAddressTempReqVO vo) {
		
		return R.ok(activityAddressTempService.insert(vo));
	}*/
    
    @GetMapping("/alllist")
    @Operation(summary ="列表-全部")
    public R<List<ActivityAddressTempRespVO>> allList(
    		@Schema(description = "名称")@RequestParam(value = "name", required = false) String name
    		) {
    	
    	return R.ok(activityAddressTempService.allList(name));
    }
    
	/*    @PostMapping("/del")
	@Operation(summary ="删除")
	public R<Integer> insert(@Schema(description = "id")@PathVariable(value = "id", required = true) Integer id) {
		
		return R.ok(activityAddressTempService.del(id));
	}*/
    
    @PostMapping("/operation")
    @Operation(summary ="批量新增")
    public R<Object> operation(@RequestBody List<String> vo) {
    	
    	return R.ok(activityAddressTempService.operation(vo));
    }

}
